import request from '../utils/request'
import qs from 'qs';

export function statistic(query){
  return request({
    url: '/subscribeStatistic/statistic',
    method: 'get',
    params: query
  })
}

export function statisticByType(query){
  return request({
    url: '/subscribeStatistic/statisticByType',
    method: 'get',
    params: query
  })
}

export function queryOrderInSubscribe(query){
  return request({
    url: '/subscribeStatistic/orderInfo',
    params: query,
    method: 'get',
    paramsSerializer: params => {
      return qs.stringify(params, { arrayFormat: 'repeat' });
    }
  })
}

export function subscribeList(query){
  return request({
    url: '/admin/subscribeStatistic/subscribe-list',
    params: query,
    method: 'get'
  })
}
